﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XinjeMesProgram.Entities.Maintenance
{
    public class MainsortRecordModel
    {
        /// <summary>
        /// 唯一 id .
        /// </summary>
        [Key]
        [Column(TypeName = "nvarchar(100)")]
        public string ID { get; set; }

        
       /// <summary>
       /// 分拣专员 .
       /// </summary>
       [Column(TypeName = "nvarchar(50)")]
        public string? SortingSpecialist { get; set; }

        /// <summary>
        /// 收货日期 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? WarehousingDate { get; set; }

        /// <summary>
        /// 收货快递名称 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? Delivery_NameIn { get; set; }

        /// <summary>
        /// 收货快递单号 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? Delivery_NumberIn { get; set; }

        /// <summary>
        /// 客户名称 .
        /// </summary>
        [Column(TypeName = "nvarchar(255)")]
        public string? Name { get; set; }

        /// <summary>
        /// 客户等级 .
        /// </summary>
        [Column(TypeName = "int(16)")]
        public int? CustomerLevel { get; set; }

        /// <summary>
        /// 客户联系方式 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? Contact_Information { get; set; }

        /// <summary>
        /// 收件人 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? Consignee { get; set; }

        /// <summary>
        /// 收货人联系方式 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? Receiving_Contact { get; set; }

        /// <summary>
        /// 收货地址 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? Shipping_Address { get; set; }

        /// <summary>
        /// 产品序列号 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? One_Dimensional_Code { get; set; }

        /// <summary>
        /// 产品型号 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? Product_Model { get; set; }

        /// <summary>
        /// 产品分类 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? Product_Classification { get; set; }

        /// <summary>
        /// 产品名称 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? Product_Name { get; set; }

        /// <summary>
        /// 产品类别 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? Product_Category { get; set; }

        /// <summary>
        /// 保内/保外 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? Guarantee { get; set; }

        /// <summary>
        /// 购货单位 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? Purchasing_Unit { get; set; }

        /// <summary>
        /// 业务员 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? Salesman { get; set; }

        /// <summary>
        /// 首次出库时间 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? Delivery_Time { get; set; }

        /// <summary>
        /// 首次出库地址信息 .
        /// </summary>
        [Column(TypeName = "nvarchar(255)")]
        public string? First_Address { get; set; }

        /// <summary>
        /// 状态 .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? State { get; set; }

        /// <summary>
        /// 分拣人员id .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? SortingUserId { get; set; }

        /// <summary>
        /// 最终确认人id .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? FinalConfirmUserId { get; set; }

        /// <summary>
        /// 编辑人id .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? UpdateUserId { get; set; }

        /// <summary>
        /// 编辑人id .
        /// </summary>
        [Column(TypeName = "datetime")]
        public DateTime? UpdateTime { get; set; }


        /// <summary>
        /// 编辑人id .
        /// </summary>
        [Column(TypeName = "datetime")]
        public DateTime? FinalConfirmTime { get; set; }

        /// <summary>
        /// 编辑人id .
        /// </summary>
        [Column(TypeName = "datetime")]
        public DateTime? SortingDate { get; set; }

        /// <summary>
        /// 分配人员id .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? AssignPersonnelUserId { get; set; }

        /// <summary>
        /// 分配人员id .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? AllocationState { get; set; }


        /// <summary>
        /// 分配人员id .
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        public string? CheckUserId { get; set; }

        /// <summary>
        /// 编辑人id .
        /// </summary>
        [Column(TypeName = "datetime")]
        public DateTime? CheckDateTime { get; set; }
        
        /// <summary>
        /// 是否二次维修 .
        /// </summary>
        [Column(TypeName = "char(2)")]
        public string? SecondaryRepairsOr { get; set; }
    }

    public class MainsortRecordState
    {
        public static Dictionary<string, string> State = new Dictionary<string, string>()
        {
            { "1" , "已收货"},
            { "2" , "待核对"},
            { "3" , "待维修"},
            { "4" , "收费中"},
            { "5" , "维修中"},
            { "6" , "维修完成"},
            { "7" , "已包装"},
            { "8" , "已发货"},
        };

        public static Dictionary<string, string> Progroup = new Dictionary<string, string>()
        {
            { "2", "生产二部"},
            { "3", "生产三部"},
            { "4", "生产四部"},
        };
    }
}
